<template>
	<view class="page-box">
		<!-- <u-navbar :autoBack="true" :title="text" placeholder bgColor="transparent"></u-navbar> -->
		<view class="pad-30">
			<u-parse :content="content"></u-parse>
		</view>
	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		postMultiGet
	} from '@/api/currency.js'
	import {
		onLoad
	} from '@dcloudio/uni-app'

	// 接收参数
	const props = defineProps({
		text: {
			type: String,
			default: ''
		},
		code: {
			type: String,
			default: ''
		}
	})

	const content = ref('');
	onLoad(() => {
		uni.setNavigationBarTitle({
			title: props.text
		})
		postMultiGet({
			codes: props.code
		}).then(res => {
			content.value = res.data.lists[props.code];
		})
	})
</script>

<style>

</style>